package com.koron.order.overhaul.bean.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class WorkTicket {

    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "工作票票号")
    private String code;

    @ApiModelProperty(value = "工单编号")
    private String orderCode;

    @ApiModelProperty(value = "工单类型")
    private String orderType;

    @ApiModelProperty(value = "工单id")
    private String orderId;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "工作票类型")
    private String type;

    @ApiModelProperty(value = "开票人所在单位id")
    private String unit;

    @ApiModelProperty(value = "开票人所在单位name")
    private String unitName;

    @ApiModelProperty(value = "工作负责人account")
    private String director;

    @ApiModelProperty(value = "工作负责人单位id")
    private String deptId;

    @ApiModelProperty(value = "工作负责人单位名称")
    private String deptName;

    private String createDept;

    private String createDeptName;

    @ApiModelProperty(value = "工作负责人名称")
    private String directorName;

    @ApiModelProperty(value = "工作地点id")
    private String location;

    @ApiModelProperty(value = "工作地点名称")
    private String locationName;

    @ApiModelProperty(value = "预计开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date estimatedStartTime;

    @ApiModelProperty(value = "预计结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date estimatedEndTime;

    @ApiModelProperty(value = "工作内容")
    private String content;

    @ApiModelProperty(value = "工作班组成员数据(包括工作负责人和班组成员)")
    private Integer number;

    @ApiModelProperty(value = "工作票状态，来源数据字典，两票管理-ticket_work_status")
    private Integer status;

    @ApiModelProperty(value = "删除标志,0：delete_flag=false，代表未删除;1：delete_flag=true，代表已删除")
    private Integer deleteFlag;

    @ApiModelProperty(value = "预览标志,0：已预览;1：未预览")
    private Integer previewFlag;

    @ApiModelProperty(value = "外单位标志,0：本单位;1：外单位")
    private Integer externalFlag;

    @ApiModelProperty(value = "创建人ID", hidden = true)
    private String createUserId;

    @ApiModelProperty(value = "创建人姓名", hidden = true)
    private String createUserName;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "修改人ID", hidden = true)
    private String updateUserId;

    @ApiModelProperty(value = "修改人姓名", hidden = true)
    private String updateUserName;

    @ApiModelProperty(value = "最后修改时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "抽查结果 0 不合格、1合格")
    private Boolean checkResults;

    @Deprecated
    @ApiModelProperty(value = "工作班组名称列表")
    private List<String> workTeamNameList;

    @ApiModelProperty(value = "实际结束时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date realEndTIme;

    @ApiModelProperty(value = "当前环节")
    private String curNodeName;

    @ApiModelProperty(value = "当前处理人")
    private String curNodeUserName;

    @ApiModelProperty(value = "工作班组名称列表")
    private String team;

    @ApiModelProperty(value = "许可时间-工单")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date oPermitTime;

    @ApiModelProperty(value = "工作结束时间-工单")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date oEndTime;
}
